<?php

namespace App\Models\V1;

use Illuminate\Database\Eloquent\Factories\HasFactory;

class Navigation extends BaseModel
{
    use HasFactory;
    protected $table="navigation";
    protected $fillable=[
        'title',
        'url',
        'pid',
        'is_outside',
        'target'
    ];

    /**
     * 是否外部链接
     * @param $key
     * @return string
     */
    public function getIsOutsideAttribute($key)
    {
        return (string) $key;
    }
}
